package com.thread.blockQueue.generant;

import java.util.concurrent.ArrayBlockingQueue;

/**
 * @Author milian
 * @Date 2021/7/29 0029 17:19
 */
public class foodie extends Thread{
    private ArrayBlockingQueue<String> bd;

    public foodie(ArrayBlockingQueue<String> bd) {
        this.bd = bd;
    }

    @Override
    public void run() {
        while (true){
            try {
                String take = bd.take();
                System.out.println("吃货将"+take+"拿出来吃了");
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
